package comits.business.tiers.dao;

import java.util.Properties;
import java.io.*;

import antlr.Utils;

import comits.business.tiers.utilitaires.LoggingOutputStream;


public class PropertiesConfig implements Serializable{

/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

		//grace au mot cle on recupere le sql correspondant
		public static String Get(String cle) {
			
		//	LoggingOutputStream log =  new LoggingOutputStream();
			//log.initializeLog();
			
			Properties prop = new Properties();
			InputStream  in;
			try {
				//comits/business/tiers/dao/
				in = PropertiesConfig.class.getResourceAsStream("requetesSQL.properties");
				//System.out.println(in);
				prop.load(in);
				in.close();
				String valeur = prop.getProperty(cle);
				return valeur;
			} catch (FileNotFoundException e) {				
				e.printStackTrace();
				
			} catch (IOException e) {
				e.printStackTrace();
			}
			return null;
		}
	

}
